package com.huawei.appmarket.service.store.awk.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appgallery.foundation.ui.framework.widget.Space;
import com.huawei.appmarket.service.store.awk.card.AppIconListCard;
import o.cdr;
import o.cih;
import o.eib;
import o.ewm.h;
import o.ewm.j;

public class AppIconListNode extends cdr {
    public AppIconListNode(Context context) {
        super(context, 1);
    }

    public int ˏ() {
        return eib.ˉ();
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        View inflate = from.inflate(h.ˊᐧ, null);
        LinearLayout linearLayout = (LinearLayout) inflate.findViewById(j.ʾʻ);
        int ˏ = ˏ();
        int ॱॱ = eib.ॱॱ();
        int ʽ = eib.ʽ();
        LayoutParams layoutParams = new LinearLayout.LayoutParams(eib.ˏ(), -1);
        for (int i = 0; i < ˏ; i++) {
            cih appIconListCard = new AppIconListCard(this.ॱ);
            View inflate2 = from.inflate(h.ᶥ, null);
            appIconListCard.ˏ(inflate2);
            ˊ(appIconListCard);
            linearLayout.addView(inflate2);
            if (i < ˏ - 1) {
                linearLayout.addView(new Space(this.ॱ), layoutParams);
            }
        }
        linearLayout.setPadding(ॱॱ, 0, ʽ, 0);
        viewGroup.addView(inflate);
        return true;
    }
}
